Page({

    /**
     * 页面的初始数据
     */
    data: {
        items: [
            { value: 0.35, name: '优惠抵扣' },
            { value: 0.35, name: '金币抵扣', checked: 'true' },
        ],
        remark: '', //备注
        couponsShowModal: false,
        maskShowModel: false,
        realShowModal: false,
        type: '',
        goodsArr: [
            {
                id: 1,
                title: '商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品商品1',
                num: 1,
                price: 10,
                selected: false,
                img: "../../images/goods-test.png"
            },
            {
                id: 2,
                title: '商品2',
                num: 2,
                price: 5,
                selected: true,
                img: "../../images/goods-test.png"
            },

        ],
    },
    radioChange: function (e) {
        console.log(e)
        console.log('Radio 发生 change value 值为：', e.detail.value)

        var items = this.data.items;
        for (var i = 0, len = items.length; i < len; ++i) {
            items[i].checked = items[i].value == e.detail.value
        }
        this.setData({
            items: items
        });
    },
    remark: function (e) {
        console.log("备注", e.detail.value)
        this.setData({
            remark: e.detail.value
        })
    },
    couponsChoose: function () {
        this.setData({
            couponsShowModal: true,
            maskShowModel: true
        })
    },
    hiddenModels: function () {
        this.setData({
            couponsShowModal: false,
            maskShowModel: false,
            realShowModal: false
        })
    },
    showRealModal: function () {
        this.setData({
            realShowModal: true,
            maskShowModel: true
        })
    },
    submit: function (e) {
        let realName = e.detail.value.realName;
        let IdNumer = e.detail.value.IdNumer;

        wx.navigateTo({
            url: '../pay-type/pay-type' // 指定页面的url
        });
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function (options) {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})